
package ro.imc.rest.client.display.util;

import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

public final class RootPanelManager {

	public static void clearForm(String rootPanelDivId) {

		RootPanel.get(rootPanelDivId).clear();
	}

	public static void attachForm(String rootPanelDivId, Widget uiObject) {

		RootPanel.get(rootPanelDivId).add(uiObject);
	}

	public static void clearUi() {

		for (String key : RootPanelDivId.divIds.keySet()) {
			if (RootPanel.get(key) != null) {
				RootPanel.get(key).clear();
			}
		}
	}
}
